﻿function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function () {
            oldonload();
            func();
        }
    }
}
var user_mark_temp = 0;
var houseHolder_mark_temp = 0;
var realtyCost_mark_temp = 0;
var parking_mark_temp = 0;
var store_mark_temp = 0;
var fix_mark_temp = 0;
var notice_mark_temp = 0;

function navigaition_buttons_contain_display_control() {
    var user_navigaition_title = document.getElementById("user_inform_title");
    var user_navigaition_buttons_contain = document.getElementById("user_button_contain");

    var houseHolder_navigaition_title = document.getElementById("houseHolder_navigaition_title");
    var houseHolder_navigaition_buttons_contain_1 = document.getElementById("houseHolder_navigaition_buttons_contain_1");
    var houseHolder_navigaition_buttons_contain_2 = document.getElementById("houseHolder_navigaition_buttons_contain_2");

    var realtyCost_navigaition_title = document.getElementById("realtyCost_navigaition_title");
    var realtyCost_button_contain = document.getElementById("realtyCost_button_contain");

    var parking_navigaition_title = document.getElementById("parking_navigaition_title");
    var parking_button_contain = document.getElementById("parking_button_contain");

    var store_navigaition_title = document.getElementById("store_navigaition_title");
    var store_button_contain = document.getElementById("store_button_contain");

    var fix_navigaition_title = document.getElementById("fix_navigaition_title");
    var fix_button_contain = document.getElementById("fix_button_contain");

    var notice_navigaition_title = document.getElementById("notice_navigaition_title");
    var notice_button_contain = document.getElementById("notice_button_contain");

    user_navigaition_title.onclick = function () {
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0

        if (user_mark_temp == 0) {
            user_navigaition_buttons_contain.className = "navigation_buttons_contain display_show";
            user_mark_temp = 1;
        }
        else if (user_mark_temp == 1) {
            user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
            user_mark_temp = 0;
        }
    };

    houseHolder_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0;

        if (houseHolder_mark_temp == 0) {
            houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_show";
            houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_show";
            houseHolder_mark_temp = 1;
        }
        else if (houseHolder_mark_temp == 1) {
            houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
            houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
            houseHolder_mark_temp = 0;
        }
    };

    realtyCost_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0;

        if (realtyCost_mark_temp == 0) {
            realtyCost_button_contain.className = "navigation_buttons_contain display_show";
            realtyCost_mark_temp = 1;
        }
        else if (realtyCost_mark_temp == 1) {
            realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
            realtyCost_mark_temp = 0;
        }
    };

    parking_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0;

        if (parking_mark_temp == 0) {
            parking_button_contain.className = "navigation_buttons_contain display_show";
            parking_mark_temp = 1;
        }
        else if (parking_mark_temp == 1) {
            parking_button_contain.className = "navigation_buttons_contain display_hide";
            parking_mark_temp = 0;
        }
    };

    store_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0;

        if (store_mark_temp == 0) {
            store_button_contain.className = "navigation_buttons_contain display_show";
            store_mark_temp = 1;
        }
        else if (store_mark_temp == 1) {
            store_button_contain.className = "navigation_buttons_contain display_hide";
            store_mark_temp = 0;
        }
    };

    fix_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        notice_button_contain.className = "navigation_buttons_contain display_hide";
        notice_mark_temp = 0;

        if (fix_mark_temp == 0) {
            fix_button_contain.className = "navigation_buttons_contain display_show";
            fix_mark_temp = 1;
        }
        else if (fix_mark_temp == 1) {
            fix_button_contain.className = "navigation_buttons_contain display_hide";
            fix_mark_temp = 0;
        }
    };

    notice_navigaition_title.onclick = function () {
        user_navigaition_buttons_contain.className = "navigation_buttons_contain display_hide";
        user_mark_temp = 0;
        houseHolder_navigaition_buttons_contain_1.className = "navigation_buttons_contain display_hide";
        houseHolder_navigaition_buttons_contain_2.className = "navigation_buttons_contain display_hide";
        houseHolder_mark_temp = 0;
        realtyCost_button_contain.className = "navigation_buttons_contain display_hide";
        realtyCost_mark_temp = 0;
        parking_button_contain.className = "navigation_buttons_contain display_hide";
        parking_mark_temp = 0;
        store_button_contain.className = "navigation_buttons_contain display_hide";
        store_mark_temp = 0;
        fix_button_contain.className = "navigation_buttons_contain display_hide";
        fix_mark_temp = 0;

        if (notice_mark_temp == 0) {
            notice_button_contain.className = "navigation_buttons_contain display_show";
            notice_mark_temp = 1;
        }
        else if (notice_mark_temp == 1) {
            notice_button_contain.className = "navigation_buttons_contain display_hide";
            notice_mark_temp = 0;
        }
    };
}
function modify_parking_show() {
    var modify_parking_div = document.getElementById("modify_parking");
    var hide_parking_div = document.getElementById("hide_parking_div");
    var parking_div = document.getElementById("parking_div");

    modify_parking_div.onclick = function () {
        this.className = "temp display_hide";
        hide_parking_div.className = "temp";
        parking_div.className = "temp_1";
    };

    hide_parking_div.onclick = function () {
        this.className = "temp display_hide";
        modify_parking_div.className = "temp";
        parking_div.className = "temp_1 display_hide";
    };
}

//window.onload = navigaition_buttons_contain_display_control;
addLoadEvent(navigaition_buttons_contain_display_control);
addLoadEvent(modify_parking_show);